home *** CD-ROM | disk | FTP | other *** search
- ; assemble this file with : ml /AT tsr_xmpl.asm ...
- ; all the stuff to make any of your program a TSR take 1435 bytes !!!
-
- PrintMac MACRO Symbol ;; used in main_prg.inc too !
- MOV AH,09h
- MOV DX,OFFSET Symbol
- INT 21h
- ENDM
-
- TsrName EQU TSR
- TsrId1 EQU 'T'
- TsrId2 EQU 'S'
- TsrId3 EQU 'R'
-
- TsrName SEGMENT
- ORG 100h ; it's a .COM file
- ASSUME CS:TsrName,DS:TsrName
- .8086 ; don't change it !!! else ... BUG (Why ???)
-
- Start: JMP Installation
-
- ; Keep these include in this order !!!
-
- INCLUDE resident.inc ; contain int handler and other stuff !
- INCLUDE main_prg.inc ; contain MainPart proc and what you need
- EndOfResident:
- INCLUDE install.inc ; contain self-detection in memory and more
-
- Installation: PrintMac CopyrightStr
- CALL DetectPrg ; set carry flag if already in memory
- JC RemoveIt
- JMP InstallPrg ; end whith int 21h, AH=31h
- RemoveIt: JMP RemovePrg ; end whith int 21h, AH=4Ch
-
- CopyrightStr DB 13,10,"TSR Exemple Program 1.0 - Coded By Sam In 1994 - A TFL/TDV Production",13,10,"$"
- InstallStr DB 13,10,"TSR Installed In Memory - Press Hot-keys SHIFT_LEFT + SHIFT_RIGHT To Use It",13,10,"$"
- RemoveStr DB 13,10,"TSR Removed From Memory - Assembly language is beautifull !!!",13,10,"$"
-
- TsrName ENDS
- END Start